package com.bw.zg3park2212.viewmodel

import androidx.navigation.fragment.NavHostFragment
import androidx.navigation.ui.setupWithNavController
import com.alibaba.android.arouter.facade.annotation.Autowired
import com.alibaba.android.arouter.facade.annotation.Route
import com.alibaba.android.arouter.launcher.ARouter
import com.bw.base.mvvm.BaseViewActivity
import com.bw.zg3park2212.R
import com.bw.zg3park2212.databinding.ActivityMainBinding
import dagger.hilt.android.AndroidEntryPoint
@Route(path = "/app/MainActivity")
@AndroidEntryPoint
class MainActivity : BaseViewActivity<ActivityMainBinding>() {
    @Autowired
    @JvmField
    var index=0
    override fun intitView() {
        ARouter.getInstance().inject(this)
        var navHostFragment=supportFragmentManager.findFragmentById(R.id.fragmentContainerView) as NavHostFragment
        var navController=navHostFragment.navController
        binding.bottom.setupWithNavController(navController)
        //设置点击传值页码
        when(index){
            0->binding.bottom.selectedItemId=R.id.blankFragment1
            1->binding.bottom.selectedItemId=R.id.blankFragment2
            2->binding.bottom.selectedItemId=R.id.blankFragment3
            3->binding.bottom.selectedItemId=R.id.blankFragment4
            4->binding.bottom.selectedItemId=R.id.blankFragment5
        }

    }

    override fun intitData() {

    }

}